package com.pinda.controller;


import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.pinda.base.entity.PdTransportTripsTruckDriver;
import com.pinda.service.IPdTransportTripsTruckDriverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.sql.Wrapper;

/**
 * <p>
 * 车次与车辆和司机关联表 前端控制器
 * </p>
 *
 * @author lc
 * @since 2023-06-14
 */
@RestController
@RequestMapping("/pd-transport-trips-truck-driver")
public class PdTransportTripsTruckDriverController {


    @Autowired
    IPdTransportTripsTruckDriverService iPdTransportTripsTruckDriverService;




    @RequestMapping("updateTransport_trips_truck_driver")
    public boolean updateTransport_trips_truck_driver(@RequestBody PdTransportTripsTruckDriver pdTransportTripsTruckDriver){
        UpdateWrapper wrapper = new UpdateWrapper();
        wrapper.eq("transport_trips_id",pdTransportTripsTruckDriver.getTransportTripsId());
        wrapper.set("truck_id",pdTransportTripsTruckDriver.getTruckId());
        wrapper.set("user_id",pdTransportTripsTruckDriver.getUserId());
        boolean update = iPdTransportTripsTruckDriverService.update(wrapper);
        return update;

    }
}
